import request from '@/utils/request'

// 获取菜单树
export function getMenuTree (params) {
  return request({
    url: 'sys/getMenu',
    method: 'post',
    params
  })
}

// 获取菜单详情
export function getMenuDetail (params) {
  return request({
    url: 'sys/getSysMenuInfo',
    method: 'post',
    params
  })
}

// 添加菜单
export function addMenu (params) {
  return request({
    url: 'sys/addMenu',
    method: 'post',
    params
  })
}

// 修改菜单
export function updateMenu (params) {
  return request({
    url: 'sys/updateSysMenuInfo',
    method: 'post',
    params
  })
}

// 删除菜单
export function deleteMenu (params) {
  params.type = 2
  return request({
    url: 'sys/deletedSys',
    method: 'post',
    params
  })
}
